package com.example.springboot_demo.service;

import com.example.springboot_demo.dto.Goods;
import com.example.springboot_demo.dto.request.GoodsRequest;
import com.example.springboot_demo.utils.AjaxResult;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;

/**
 * <P> @Author: SongKeCheng
 * <P> Description:
 * <P> Type: Interface
 * <P> Date: 2024/6/23:16:57
 */

public interface GoodsService {
    /**
     * 根据id 查询商品信息
     */
    Goods findById(Integer id);

    AjaxResult addGoods(GoodsRequest goodsRequest);


    AjaxResult testTransactional1(GoodsRequest goodsRequest) throws IOException;


    AjaxResult testTransactional2(GoodsRequest goodsRequest) throws IOException;

    AjaxResult findByPage(GoodsRequest goodsRequest);
}
